home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-11 | 1.9 KB | 51 lines | [TEXT/R*ch] |
- Programmer Information :
-
- Starting with version 1.1, Décor defines a custom Gestalt selector in order to allow communication
- between the cdev and the trap patches. The selector is 'FrçP'. The returned value is a pointer on the
- following structure :
-
- // Version 1.1.*
-
- #define version11 1100L
-
- typedef struct {
- long version;
- /* Version number */
- GWorldPtr world;
- /* This GWorld contains the picture and is located in High RAM */
- Rect mainScreen;
- /* simply (*GetMainDevice())->gdRect. Stored here to save time */
- Boolean standardPat;
- /* if set, the patches use DeskCPat instead of the picture */
- } GlobalsRec, *GlobalsPtr;
-
- // Version 1.2 and up
-
- #define version12 1200L
-
- typedef struct {
- long version;
- /* Version number */
- GWorldPtr world;
- /* This GWorld contains the picture and is located in High RAM */
- Rect mainScreen;
- /* simply (*GetMainDevice())->gdRect. Stored here to save time */
- Boolean standardPat;
- /* if set, the patches use DeskCPat instead of the picture */
- Boolean checkDepth;
- /* if set, the patches draw the picture only if the current depth is equal to orgDepth */
- short orgDepth;
- /* original screen depth, recorded during startup. This is the depth of 'world' */
- } GlobalsRec, *GlobalsPtr;
-
- Before using the structure, make sure that the version field contains a known value. Otherwise,
- you are dealing with a new version, and the structure may have changed.
-
- You can change the picture by drawing something into world and forcing a desktop redraw.
- In order to easily redraw the desktop, use PaintOne (NULL, GetGrayRgn());
- You can revert to the standard desktop pattern by setting standardPat to 1 and redrawing the
- desktop.
-
- If you create a program that takes advantage of this information, please drop a mail at
- pottier@dmi.ens.fr - I'd like to know about it!
-